﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ankha.ContentPipeline
{
    public class Pipeline
    {
        //fields
        private Dictionary<string, IPipelineExtention> _Extentions;

        //ctor
        public Pipeline()
        {
            _Extentions = new Dictionary<string, IPipelineExtention>();
        }

        //Methods
        public void AddPipeline(IPipelineExtention ext)
        {
            ScreenManager.DebugLogInstance.WriteString(string.Format("Adding Extention {0}", ext.Name));
            ext.Load();
            this._Extentions.Add( ext.Name, ext);
        }
        public void LoadPipeline()
        {
            foreach (IPipelineExtention ext in _Extentions.Values)
            {
                ScreenManager.DebugLogInstance.WriteString(string.Format("Calling Load on Extention {0}", ext.Name));
                ext.Load();
            }
        }
    }
}
